-- ================================================
-- Template generated from Template Explorer using:
-- Create Procedure (New Menu).SQL
--
-- Use the Specify Values for Template Parameters 
-- command (Ctrl-Shift-M) to fill in the parameter 
-- values below.
--
-- This block of comments will not be included in
-- the definition of the procedure.
-- ================================================
USE CDS
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Sushil Mittal
-- Create date: 
-- Description:	
-- =============================================
IF OBJECT_ID('sp_CDS_Imputation_ExtractRelevantColsFromAllTables14') IS NOT NULL
    DROP PROCEDURE sp_CDS_Imputation_ExtractRelevantColsFromAllTables14

GO
CREATE PROCEDURE sp_CDS_Imputation_ExtractRelevantColsFromAllTables14
	-- Add the parameters for the stored procedure here
	--@TableName NVARCHAR(100)
AS
BEGIN
	-- Insert statements for procedure here	SET NOCOUNT ON;
SELECT

/*Unique ID    */ psu_caseid_accyear_vehno_occno,
/*oa           */ age, paruse, chorient, seatpos, ejection, glasgow, treatmnt, death,
/*oi           */ aiscode,
/*accident     */ mancoll,
/*event        */ class1, class2, objcont,
/*gv           */ dvtotal, dvest, splimit

FROM

CDS_AllTables14
--Filter based on Age first
WHERE

accseq = 1

ORDER BY psu_caseid_accyear_vehno_occno

END
GO
